#include"shm.hpp"
#include"fifo.hpp"

int main()
{
    Shm shm(pathname,progid,CREATER);

    NameFifo fifo(PATH,FILENAME);
    FileOper readerfile(PATH,FILENAME);
    readerfile.OpenForRead();
    
    char *mem = (char *)shm.VirtualAddr();
    while(true)
    {
        if(readerfile.Wait())
            std::cout<<mem<<std::endl;
        else
            break;
    }
    readerfile.Close();
    return 0;
}